void func(LinkList &L, int n){
    vector<int> v(n+1, 0);
    LNode *p = L;
    while(p->next){
        int val = abs(p->next->data);
        if(v[val]){
            p->next = p->next->next;
        }else{
            v[val] = 1;
            p = p->next;
        }
    }
}